package com.pojo;

/**
 * @Description 微信常量类
 * @Author: chengtianping
 * @Date 2020/2/25 9:42
 */
public class WeChatConstants {

    /**
     *  ===============================================微信公众号基本配置属性相关=======================================================
     */
    /**
     * D_S_MP_ID
     */
    public static final String D_S_MP_ID  = "gh_26964c52a1c9";
//    public static final String D_S_MP_ID = "gh_83da3ed70f64";
    /**
     * APP_ID
     */
    public static final String APP_ID     = "wx17830f044ae60b94";
//    public static final String APP_ID = "wx6a8dc4cddf85a1aa";
    /**
     * APP_SECRET
     */
    public static final String APP_SECRET = "0298f73f11956cd9de5fcb75de6a8668";
//    public static final String APP_SECRET = "91cfc3c88700f02a4755711145a6b791";
    /**
     * TOKEN
     */
    public static final String TOKEN = "weixin";

    /**
     * 消息加解密密钥 EncodingAESKey
     */
    public static final String D_S_AES_KEY = "9BRe5jyNI2OR9OTSUJLenvAWr7wgw9JdWVvSH3nScJO";


    /**
     * 域名（公众号域名）
     */
    public static final String WECHAT_DOMAIN_NAME = "https%3A%2F%2Fwechat.sevencube-hr.com";

    /**
     * 公众号绑定账号菜单重定向地址
     */
    public static final String GET_CODE_REDIRECT_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + APP_ID + "&redirect_uri=" + WECHAT_DOMAIN_NAME
            + "&response_type=code&scope=snsapi_base#wechat_redirect";


    /**
     *  ===============================================微信各种接口相关=======================================================
     */

    /**
     * 微信公众平台API入口
     */
    public static final String WECHAT_API = "https://api.weixin.qq.com";

    /**
     * openapi入口
     */
    public static final String OPEN_API = "https://open.weixin.qq.com";

    /**
     * CGI_BIN路径
     */
    public static final String CGI_BIN = WECHAT_API + "/cgi-bin";

    /**
     * 获取access_token地址
     */
    public static final String ACCESS_TOKEN = "/token?grant_type=client_credential&appid=%s&secret=%s";

    /**
     * 发送消息（公众号）
     */
    public static final String WECHAT_SEND_MESSAGE = "/message/template/send?access_token=%s";

    /**
     * 发送消息（下发小程序和公众号统一的服务消息）
     */
    public static final String UNIFORM_SEND_MESSAGE = "/message/wxopen/template/uniform_send?access_token=%s";

    /**
     * 获取帐号的关注者列表
     */
    public static final String GET_USER_LIST = "/user/get?access_token=%s";

    /**
     * HTTP请求 重试次数
     */
    public static final int RETRY_COUNT = 3;

    /**
     * 登录凭证校验。通过 wx.login 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程
     */
    public static final String AUTH_CODE2SESSION = "https://api.weixin.qq.com/sns/jscode2session";

    /**
     * 创建菜单
     */
    public static final String CREATE_MENU_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=";

    /**
     * 用户同意授权，获取code
     */
    public static final String CONNECT_AUTHORIZE = "/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base#wechat_redirect";

    /**
     * 通过code换取网页授权access_token
     */
    public static final String SNS_OPENID = "/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";


    /**
     * ===============================================事件相关===========================================================
     */
    public static final String REQ_MESSAGE_TYPE_EVENT = "event";
    public static final String FromUserName = "FromUserName";
    public static final String ToUserName = "ToUserName";
    public static final String MsgType = "MsgType";
    public static final String Content = "Content";
    public static final String Event = "Event";

    /**
     *  ===============================================微信消息模板ID===========================================================
     */
    /**
     * 待办事项提醒-OPENTM402104437 模板ID
     */
    public static final String MESSAGE_TEMPLATE_TODO_REMIND = "_OxfwGNoXr_tbMj4deRhsud6EEuH4KIL-Mpm4oGE7wM";

    /**
     * 审核结果通知-OPENTM411984401 模板ID
     */
    public static final String MESSAGE_TEMPLATE_CHECK_RESULT_NOTIFICATION = "t4nVAg6dMSpuP9ywp7CogiVTeiyyd0SEfOwRgndPENk";

    /**
     * 撤回通知-OPENTM205504287 模板ID
     */
    public static final String MESSAGE_TEMPLATE_WITHDRAW_NOTIFICATION = "Jaus8BKmTcRAv9me1ZKZD7AHHWXTmA7LhbtPBQYDEP0";

    /**
     * 办理进程通知-OPENTM407176955 模板ID
     */
    public static final String MESSAGE_TEMPLATE_PROCESS_NOTIFICATION = "om1iqEiqFnIJIN5JXho3xBj2RiIl9NJjDF6R4KQAP3A";

    /**
     *  ===============================================微信消息===========================================================
     */

    /**
     * 消息标题
     */
    public static final String MESSAGE_TEMPLATE_TITLE = "{0}申请-{1}-(单号:{2})";

    /**
     * 待办
     */
    public static final String MESSAGE_TEMPLATE_FIRST_TODO = "您有新的待办事项。";
    public static final String MESSAGE_TEMPLATE_FIRST_REFUSE = "您的{0}流程被退回了。";
    public static final String MESSAGE_TEMPLATE_FIRST_PASS = "您的{0}流程已通过，请知晓。";
    public static final String MESSAGE_TEMPLATE_FIRST_RECALL = "{0}撤回了{1}。";
    public static final String MESSAGE_TEMPLATE_TURN_TODO = "{0}的{1}试用期将{2}结束，请为他发起转正流程。";

    /**
     * 备注
     */
    public static final String MESSAGE_TEMPLATE_REMARK_TODO = "请及时处理。";
    public static final String MESSAGE_TEMPLATE_REMARK_REFUSE = "请修改后重新提交。";
    public static final String MESSAGE_TEMPLATE_REMARK_RECALL = "点击查看详情。";
    public static final String MESSAGE_TEMPLATE_REMARK_TURN = "点击新建";

    /**
     * 跳转地址
     */
    public static final String MESSAGE_TEMPLATE_URL_TODO = "http://mp.weixin.qq.com";

    /**
     * 流程详情页
     */
    public static final String OFFER_PROC_DETAILS = "pages/offerApproval/projectReview/index?offerProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String ENTRY_PROC_DETAILS = "pages/startWork/projectReview/index?inductionProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String BECOME_PROC_DETAILS = "pages/becomeRegular/staffSubmit/index?positiveProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String BECOME_PROC_KEY_ADD = "/pages/becomeRegular/superiorInit/index?positiveProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String DIMI_PROC_DETAILS = "pages/leaveOffice/check/index?dimissionProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String DIMI_PROC_KEY_ADD = "pages/leaveOffice/create/index?dimissionProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String SPON_DIMI_PROC_DETAILS = "pages/leaveOffice/attritionCheck/index?dimissionProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String SPON_DIMI_PROC_KEY_ADD = "pages/leaveOffice/attrition/index?dimissionProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String LEAVE_PROC_DETAILS = "pages/takeLeave/check/index?leaveProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String LEAVE_PROC_KEY_ADD = "pages/takeLeave/create/index?leaveProcId={0}&procTemplate={1}&copyToFlag={2}&copyToFlag={2}";
    public static final String ATTE_PROC_DETAILS = "pages/attendance/review/index?attendanceProcId={0}&procTemplate={1}&copyToFlag={2}";
    public static final String ATTE_PROC_KEY_ADD = "pages/attendance/overview/index?attendanceProcId={0}&procTemplate={1}&copyToFlag={2}";




}
